module.exports = options =>{
    return async (req,res,next)=>{
        const modelName = require('inflection').classify(req.params.resource)
        // console.log(req.params.resource);
        req.Model = require(`../models/${modelName}`)
        // console.log(req.Model);
        await next()
    }
}